<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
   <head>
   </head>
   <body>
    <s:actionmessage theme='jquery' />
     <s:form theme="simple" name="form_rpx" id="form_rpx"  > 
         <s:set name="valx0" ><s:property value="ncontrato" /></s:set>
         <s:hidden name="ncontrato" id="ncontrato" value='%{valx0}' ></s:hidden>
         <s:set name="valx1" ><s:property value="cod_factura" /></s:set>
         <s:hidden name="codigo" id="codigo" value='%{valx1}' ></s:hidden>
         <s:set name="valx2" ><s:property value="tp_contrato" /></s:set>
         <s:hidden name="tp_contrato" id="tp_contrato" value='%{valx2}' ></s:hidden>
         <center><input type="button" onclick="abrir_x();" value="Ingresar otra venta"></center>
     </s:form>
       <script type="text/javascript">
          var con=document.getElementById('ncontrato').value;
          var fac=document.getElementById('codigo').value;
          var tpc=document.getElementById('tp_contrato').value;
          if(tpc=='PYME'){
        	  window.open("imprimircontrato_pyme.jsp?id="+con);
          }else{
        	  window.open("imprimircontrato_.jsp?id="+con);
          }
          window.open("comprobante.jsp?codigo="+fac);
          function abrir_x(){
      		 location='pmenus.action?urlx=10022';
      	  }
      </script>
   </body>
</html>


